package com.naiterui.ehp.bs.cms.modules.user.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.naiterui.ehp.bs.cms.common.constants.DsName;
import com.naiterui.ehp.bs.cms.modules.user.entity.Doctor;
import com.naiterui.ehp.bs.cms.modules.user.vo.DoctorBaseInfoVO;
import com.naiterui.ehp.bs.cms.modules.user.vo.DoctorPageVO;
import com.naiterui.ehp.bs.cms.modules.user.vo.record.ReocrdUserBaseInfoVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@DS(DsName.EHP)
public interface DoctorMapper extends BaseMapper<Doctor> {

    DoctorBaseInfoVO getById(@Param("doctorId") Long doctorId);

    Page<DoctorPageVO> getPage(@Param("page") IPage<DoctorPageVO> page, @Param("ew") Wrapper<DoctorPageVO> entityWrapper);

    List<DoctorBaseInfoVO> getByPatientId(@Param("patientId") Long patientId);

    ReocrdUserBaseInfoVO getReocrdUserBaseInfo(@Param("doctorId") Long doctorId);

    Page<DoctorPageVO> getExpertPage(@Param("page") IPage<DoctorPageVO> page, @Param("ew") Wrapper<DoctorPageVO> entityWrapper);

    /**
     * 根据医生id获取签名证书序列号
     * @param doctorId 医生id
     * @return 签名证书序列号
     */
    String getSealCertNumberByDoctorId(Long doctorId);

}

